package com.ruyuan.ingestion.kafka.consumer;

import com.ruyuan.ingestion.common.Persistable;
import com.ruyuan.ingestion.parser.hbase.HBaseTrainParser;
import com.ruyuan.ingestion.sink.HBaseWriter;

public class TrainConsumer extends BaseConsumer {


    @Override
    protected String getKafkaTopic() {
        return "train";
    }

    @Override
    protected Boolean getKafkaAutoCommit() {
        return false;
    }

    @Override
    protected String getKafkaConsumerGrp() {
        return "TrainConsumer"+getKafkaTopic();
    }

    @Override
    protected int getMaxPollRecords() {
        return 2000;
    }

    @Override
    protected int getMaxPollIntervalMillis() {
        return 3000;
    }

    @Override
    protected Persistable[] getWrites() {
        return new Persistable[]{
                new HBaseWriter("ry_event_db:train",new HBaseTrainParser())
        };
    }
}
